package com.wwp.tbshop.presenter;


import com.wwp.tbshop.activity.orderlist.OrderListActivity;
import com.wwp.tbshop.model.bean.OrderListItemsBean;

import java.util.List;

/**
 * Created by user on 2017/6/15.
 */

public class OrderListOperation extends OrderListNetOperation {
    private static final String TAG = "OrderListOperation";
    private OrderListActivity mOrderListActivity;

    public OrderListOperation(OrderListActivity activity) {
        super(activity);
        mOrderListActivity = activity;
    }

    public void processListData(OrderListItemsBean orderListItemsBean, int type) {
        if(orderListItemsBean.response.equals("error")){
            mOrderListActivity.processError(orderListItemsBean.error);
        }else{
            List<OrderListItemsBean.OrderListBean> orderList = orderListItemsBean.returnList();
            if(orderList!=null){
                mOrderListActivity.upDateOrderList(orderList,type);
            }
        }

    }

}
